package com.mt.checkerin.model;

import java.util.ArrayList;
import java.util.List;

import org.apache.http.Header;

public class WebSite {
	
	private String name;
	
	private List<Header> headerLst = new ArrayList<Header>();
	
	private List<PageForm> formLst = new ArrayList<PageForm>();

	private int pageFormIndex = 0;
	
	private String webAgent = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.76 Safari/537.36";
	

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public List<PageForm> getFormLst() {
		return formLst;
	}

	public void setFormLst(List<PageForm> formLst) {
		this.formLst = formLst;
	}

	public List<Header> getHeaderLst() {
		return headerLst;
	}

	public void setHeaderLst(List<Header> headerLst) {
		this.headerLst = headerLst;
	}
	
	public boolean moveToNextForm() {
		if (pageFormIndex < (formLst.size() - 1)) {
			pageFormIndex++;
			return true;
		}
		return false;
	}
	
	public PageForm getCurrentPageForm() {
		if (pageFormIndex >= formLst.size()) {
			return null;
		}
		return formLst.get(pageFormIndex);
	}
	
	public PageForm getNextPageForm() {
		if (pageFormIndex >= formLst.size()) {
			return null;
		}
		return formLst.get(pageFormIndex + 1);
	}
	
	public PageForm getPrePageForm() {
		if (pageFormIndex == 0) {
			return null;
		}
		return formLst.get(pageFormIndex - 1);
	}

	public String getWebAgent() {
		return webAgent;
	}

	public void setWebAgent(String webAgent) {
		this.webAgent = webAgent;
	}
	
	
}
